<template>
      <div class="home-content">
        <div>
          <h1><img src="../assets/yuantong.png" width="210" height="50"></h1>
          <p>您好，我是大模型知识库，集成了知识图谱 GraphRAG & 多模态检索 MultimodalRAG，欢迎提问~</p>
        </div>
        <div class="begin-btn" @click="goCharPage()">
          <h3>开始对话</h3>
          <p>体验全新智能助手</p>
        </div>
        <!-- <el-input
          class="question-input"
          v-model="input3"
          style="max-width: 600px"
          placeholder="请输入..."
        >
          <template #append>
            <el-button @click="goCharPage()"><el-icon><Promotion /></el-icon></el-button>
          </template>
        </el-input> -->
        <!-- <ul class="suggestion-list">
          <li>What are the key features of FortiGate?</li>
          <li>What are the key features of FortiGate?</li>
          <li>What are the key features of FortiGate?</li>
          <li>What are the key features of FortiGate?</li>
        </ul> -->
      </div>
</template>
<script setup>
import { Promotion } from '@element-plus/icons-vue';
// import { id } from 'element-plus/es/locales.mjs';
import { useRouter } from 'vue-router';
const router = useRouter();

let input3 = ref('');
function goCharPage(){
  let random1 = Date.now() // Math.floor(Math.random()*90);// 生成90以内随机数
  // router.push({ name: 'Chat', query: { key: input3.value, id: random1} 
  router.push({ name: 'Chat', query: {id: random1} 
  });
}
</script>
<style lang="scss" scoped>
.home-content{
  width: 800px;
  height: auto;
  margin: 0 auto;
  padding-top: 30vh;
  // display: flex;
  // justify-content: center;
  // align-items: center;
  h1{
    font-size: 1.875rem;
  }
  p{
    font-size: 16px;
    margin: 20px 0;
    color: #64748B;
  }
  .begin-btn{
    padding-top: 30px;
    width: 360px;
    height: 133px;
    border-radius: 1rem;
    box-shadow: 0 0 0 1px #f1f5f9, 0 2px 4px rgba(0, 0, 0, .05), 0 12px 24px rgba(0, 0, 0, .05);
    margin: 50px auto;
    cursor: pointer;
    &:hover{
      border: 3px solid #1758A7;
    }
    h3{
      font-size: 1.1rem;
      color: #1758A7;
    }
    p{
      color: #64748B;
    }
  }
  .question-input{
    margin: 40px 0;
    height: 40px;
  }
  .suggestion-list{
    overflow: hidden;
    li{
      width: 49%;
      height: 30px;
      line-height: 30px;
      border: 1px solid #e4e7ed;
      border-radius: 5px;
      text-align: center;
      float: left;
      font-size: 12px;
      cursor: pointer;
      margin-bottom: 20px;
    }

  }
}
</style>
